<?php
/** 
*
* @package phpBB3 :: phpBB OpenID
* @version $Id: common.php 77 2010-02-28 07:37:17Z jonzenor $
* @copyright (c) 2007 phpBB Group 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
* @author: MasterZ - http://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=83328
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}

$path_extra = dirname(__FILE__);
$path = ini_get('include_path');
$path = $path_extra . PATH_SEPARATOR . $path;
ini_set('include_path', $path);

/**
 * Require the OpenID consumer code.
 */
require_once($phpbb_root_path . "includes/openid/Auth/OpenID/Consumer." . $phpEx);

/**
 * Require the "file store" module, which we'll need to store OpenID
 * information.
 */
require_once($phpbb_root_path . "includes/openid/Auth/OpenID/FileStore." . $phpEx);

require_once($phpbb_root_path . "includes/openid/Auth/OpenID/SReg." . $phpEx);

/**
 * This is where the example will store its OpenID information.  You
 * should change this path if you want the example store to be created
 * elsewhere.  After you're done playing with the example script,
 * you'll have to remove this directory manually.
 */
$store_path = "/tmp/_php_consumer_test";

if (!file_exists($store_path) &&
    !mkdir($store_path)) {
    print "Could not create the FileStore directory '$store_path'. ".
        " Please check the effective permissions.";
    exit(0);
}

$store = new Auth_OpenID_FileStore($store_path);

/**
 * Create a consumer object using the store object created earlier.
 */
$consumer = new Auth_OpenID_Consumer($store);

?>
